#!/usr/bin/env python

import __init__
from symbide import ModuleManager
from sys import exit, argv
    
def run():
    '''
    Starts Symbide window.
    '''
    if ModuleManager.hasModule('gtk'):
        from symbide.src.widgets import window
        window.run()
    else:
        print 'gtk is not available'
        exit(1)


if __name__== '__main__':
    #set process-name to 'Symbide'
    if ModuleManager.hasModule('ctypes'):
        import ctypes
        libc = ctypes.CDLL('libc.so.6')
        libc.prctl(15, 'symbide', 0, 0, 0)
    
    #start symbide window
    run()